#!/bin/bash

export PATH="~/.platformio/penv/bin":"~/.platformio/penv":${PATH}

# 编译代码
if [ $# == 0 ];
then

    platformio  run --environment nodemcuv2
    
fi

# 执行清理 生成文件系统
if [ $# == 1 ];
then

    case "$1" in
    clean)
        platformio run --target clean --environment nodemcuv2
    ;;
    fs)
        platformio run --target buildfs --environment nodemcuv2
    ;;
    esac

fi

